<!doctype html>
<html lang="zh" ng-app="app">
<head>
  <meta charset="utf-8">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="mobile-web-app-capable" content="yes">

  <title>服务评价</title>  
  
  <link rel="stylesheet" href="/static/weixin/css/app.css">
  
  <script src="/static/weixin/js/config.js"></script>

   <script src="/static/weixin/js/zarpemain.js"></script>

   <script src="/static/weixin/js/solist.js"></script>
  
  
  <script>
    ons.ready(function() {
    });
  </script>
  
</head>
<body>
  <ons-navigator var="soListNav" title="未评价服务">    
    <!-- Service ORde without feedback -->
    <ons-page ng-controller="ServiceOrderListController">
      <ons-list>
        <ons-list-item ng-show="!service_orders.length">没有可评价的服务</ons-list-item>
        <ons-list-item ng-repeat="so in service_orders" modifier="tappable">
          <ons-row>
            <ons-col>
              <p class="date">服务日期: {{so.arrivedTimeInDisplay}}</p> 
              <p class="person">服务顾问: {{so.service_advisor.real_name}}</p>
            </ons-col>
            <ons-col>
              <a style="text-align:right; " ng-click="writeFeedback(so, 'feedback.html')">评价顾问 <ons-icon style="margin-right:10px" icon="ion-ios7-compose-outline" ></ons-icon></a>
            </ons-col>
          </ons-row>
        </ons-list-item>
      </ons-list>
      <ons-modal var="app.modal">
        <ons-icon icon="gear" spin="true" style="line-height: 20px; vertical-align: middle;" ></ons-icon>
        <span style="line-height: 20px; font-size: 15px;">获取数据中。。。</span>
      </ons-modal>
    </ons-page>

    <ons-template id="feedback.html">
      <ons-page ng-controller="FeedbackController">
        <ons-toolbar>
          <div class="center">服务日期 {{service_order.arrivedTimeInDisplay}}</div>
        </ons-toolbar>
        <div class="content">
          <div class="list-header">服务顾问 <b>{{service_advisor.real_name}}</b></div>
          <div class="goodbad-group">
              <ons-row>
                <ons-col ng-click="rate(false,0, $event)"><ons-icon icon="fa-thumbs-o-down"></ons-icon> 踩</ons-col>
                <ons-col ng-click="rate(true, 1, $event)"><ons-icon icon="fa-thumbs-o-up"></ons-icon> 赞</ons-col>
              </ons-row>
          </div>
        </div>
        <div class="content">
          <div class="list-header">服务评价</div>
          <ons-list modifier="inset" style="margin-top: 10px">
            <ons-list-item><textarea class="textarea textarea--transparent" ng-model="notes" placeholder="请留下对服务的评价" style="width: 100%; height: 200px;"></textarea></ons-list-item>
          </ons-list>
        </div>
        <div>
          <ons-row>
            <ons-col width="50%"  style="padding: 10px 5px 10px 9px">
              <ons-button modifier="large" style="margin: 0 auto;" ng-click="submitSAFeedback()">
                提交反馈
              </ons-button>
            </ons-col>
            <ons-col width="50%"  style="padding: 10px 9px 10px 5px">
              <ons-button modifier="large" style="margin: 0 auto; background-color:#eb482f" ng-click="backToList()">
                取消
              </ons-button>
            </ons-col>
          </ons-row>
          
          
        </div>
      </ons-page>
    </ons-template>
  </ons-navigator>
  
</body>
</html>